// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class UB1 : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Set ID - UB1",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"SI")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"SI")]
	    public SI SetIDUB1 {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Blood Deductible  (43)",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BloodDeductible43 {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Blood Furnished-Pints",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BloodFurnishedPints {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Blood Replaced-Pints",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BloodReplacedPints {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Blood Not Replaced-Pints",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM BloodNotReplacedPints {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Co-Insurance Days",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM CoInsuranceDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Condition Code",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.True, HL7Required.True,"IS")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.True, HL7Required.True,"IS")]
		[ConditionCode]
	    public IS[] ConditionCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Covered Days",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM CoveredDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Non Covered Days",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM NonCoveredDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Value Amount & Code",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.True, HL7Required.True,"CM_UVC")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.True, HL7Required.True,"UVC")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.True, HL7Required.True,"UVC")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.True, HL7Required.True,"UVC")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.True, HL7Required.True,"UVC")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.True, HL7Required.True,"UVC")]
	    public UVC[] ValueAmountCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Number Of Grace Days",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM NumberOfGraceDays {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Special Program Indicator",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"CE_0348")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"CE_0348")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"CWE")]
		[SpecialProgramIndicator]
	    public CWE SpecialProgramIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 PSRO/UR Approval Indicator",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.False, HL7Required.True,"CE_0349")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"CE_0349")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"CWE")]
		[PSROURApprovalIndicator]
	    public CWE PSROURApprovalIndicator {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 PSRO/UR Approved Stay-Fm",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"DT")]
	    public DT PSROURApprovedStayFm {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 PSRO/UR Approved Stay-To",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"DT")]
	    public DT PSROURApprovedStayTo {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Occurrence",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.True, HL7Required.True,"CM_OCD")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.True, HL7Required.True,"OCD")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.True, HL7Required.True,"OCD")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.True, HL7Required.True,"OCD")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.True, HL7Required.True,"OCD")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.True, HL7Required.True,"OCD")]
	    public OCD[] Occurrence {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Occurrence Span",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.False, HL7Required.True,"CE_0351")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.False, HL7Required.True,"CE_0351")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.False, HL7Required.True,"CWE")]
		[OccurrenceSpan]
	    public CWE OccurrenceSpan {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Occur Span Start Date",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"DT")]
	    public DT OccurSpanStartDate {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Occur Span End Date",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"DT")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"DT")]
	    public DT OccurSpanEndDate {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 UB-82 Locator 2",20)]
  	    [HL7Field(HL7Version.v23, 20, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST UB82Locator2 {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 UB-82 Locator 9",21)]
  	    [HL7Field(HL7Version.v23, 21, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 21, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST UB82Locator9 {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 UB-82 Locator 27",22)]
  	    [HL7Field(HL7Version.v23, 22, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 22, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 22, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST UB82Locator27 {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 UB-82 Locator 45",23)]
  	    [HL7Field(HL7Version.v23, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"ST")]
	    public ST UB82Locator45 {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 24)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 25)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 26)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			SetIDUB1 = (SI)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(SI), "UB1.1");
			BloodDeductible43 = (NM)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(NM), "UB1.2");
			BloodFurnishedPints = (NM)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(NM), "UB1.3");
			BloodReplacedPints = (NM)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(NM), "UB1.4");
			BloodNotReplacedPints = (NM)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(NM), "UB1.5");
			CoInsuranceDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(NM), "UB1.6");
	    	ConditionCode = (IS[])ParseTextAtPositionIntoDataArray<IS>(segmentTextParts, 7, options, "UB1.7");
			CoveredDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(NM), "UB1.8");
			NonCoveredDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(NM), "UB1.9");
	    	ValueAmountCode = (UVC[])ParseTextAtPositionIntoDataArray<UVC>(segmentTextParts, 10, options, "UB1.10");
			NumberOfGraceDays = (NM)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(NM), "UB1.11");
			SpecialProgramIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(CWE), "UB1.12");
			PSROURApprovalIndicator = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(CWE), "UB1.13");
			PSROURApprovedStayFm = (DT)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(DT), "UB1.14");
			PSROURApprovedStayTo = (DT)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(DT), "UB1.15");
	    	Occurrence = (OCD[])ParseTextAtPositionIntoDataArray<OCD>(segmentTextParts, 16, options, "UB1.16");
			OccurrenceSpan = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 17, options, typeof(CWE), "UB1.17");
			OccurSpanStartDate = (DT)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(DT), "UB1.18");
			OccurSpanEndDate = (DT)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(DT), "UB1.19");
			UB82Locator2 = (ST)ParseTextAtPositionIntoData(segmentTextParts, 20, options, typeof(ST), "UB1.20");
			UB82Locator9 = (ST)ParseTextAtPositionIntoData(segmentTextParts, 21, options, typeof(ST), "UB1.21");
			UB82Locator27 = (ST)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(ST), "UB1.22");
			UB82Locator45 = (ST)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(ST), "UB1.23");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("UB1");
		    segmentParts.Add(SetIDUB1);
			segmentParts.Add(GetER7TextForSegmentPart(BloodDeductible43, options));
			segmentParts.Add(GetER7TextForSegmentPart(BloodFurnishedPints, options));
			segmentParts.Add(GetER7TextForSegmentPart(BloodReplacedPints, options));
			segmentParts.Add(GetER7TextForSegmentPart(BloodNotReplacedPints, options));
			segmentParts.Add(GetER7TextForSegmentPart(CoInsuranceDays, options));
		    segmentParts.Add(ConvertStringArray(ConditionCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(CoveredDays, options));
			segmentParts.Add(GetER7TextForSegmentPart(NonCoveredDays, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(ValueAmountCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(NumberOfGraceDays, options));
			segmentParts.Add(GetER7TextForSegmentPart(SpecialProgramIndicator, options));
			segmentParts.Add(GetER7TextForSegmentPart(PSROURApprovalIndicator, options));
			segmentParts.Add(GetER7TextForSegmentPart(PSROURApprovedStayFm, options));
			segmentParts.Add(GetER7TextForSegmentPart(PSROURApprovedStayTo, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(Occurrence, options));
			segmentParts.Add(GetER7TextForSegmentPart(OccurrenceSpan, options));
			segmentParts.Add(GetER7TextForSegmentPart(OccurSpanStartDate, options));
			segmentParts.Add(GetER7TextForSegmentPart(OccurSpanEndDate, options));
		    segmentParts.Add(UB82Locator2);
		    segmentParts.Add(UB82Locator9);
		    segmentParts.Add(UB82Locator27);
		    segmentParts.Add(UB82Locator45);
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

